package com.javase.constant;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * Created by tongchao on 2015/11/3.
 */
public class ProductImportDTO implements Serializable{
    private Long supplierId;                    //供应商ID
    private String supplierName;                //供应商名称
    private BigDecimal purchasePrice;           //采购价
    private BigDecimal rebatePrice;             //采购返点价

    private Long brandId;                       //品牌ID
    private String brandName;                   //品牌名称

    private Long productId;                     //产品ID
    private String productSn;                   //产品编号
    private String newProductSn;                //新产品编号(如果提供则替换productSn)
    private String productName;                 //产品名称
    private String newProductName;              //新产品名称(如果提供则替换newProductName)
    private String unit;                         //单位
    private BigDecimal subsidyPrice;            //销售补贴价
    private BigDecimal salePrice;               //销售价
    private BigDecimal marketPrice;             //市场价
    private String image;                       //商品的默认图片
    private Boolean isList;                     //商品是否显示
    private Boolean isMarketable;              //商品是否有货

    private Long firstCategoryId;               //一级类别ID
    private String firstCategoryName;           //一级类别名称
    private Long secondCategoryId;              //二级类别ID
    private String secondCategoryName;          //二级类别名称
    private Long thirdCategoryId;               //三级类别ID
    private String thirdCategoryName;           //三级类别名称
    private Long forthCategoryId;               //四级类别ID
    private String forthCategoryName;           //四级类别名称

    private String markStatus;                  //记录的标示状态

    public Long getSupplierId() {
        return supplierId;
    }

    public void setSupplierId(Long supplierId) {
        this.supplierId = supplierId;
    }

    public String getSupplierName() {
        return supplierName;
    }

    public void setSupplierName(String supplierName) {
        this.supplierName = supplierName;
    }

    public BigDecimal getPurchasePrice() {
        return purchasePrice;
    }

    public void setPurchasePrice(BigDecimal purchasePrice) {
        this.purchasePrice = purchasePrice;
    }

    public BigDecimal getRebatePrice() {
        return rebatePrice;
    }

    public void setRebatePrice(BigDecimal rebatePrice) {
        this.rebatePrice = rebatePrice;
    }

    public Long getBrandId() {
        return brandId;
    }

    public void setBrandId(Long brandId) {
        this.brandId = brandId;
    }

    public String getBrandName() {
        return brandName;
    }

    public void setBrandName(String brandName) {
        this.brandName = brandName;
    }

    public Long getProductId() {
        return productId;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }

    public String getProductSn() {
        return productSn;
    }

    public void setProductSn(String productSn) {
        this.productSn = productSn;
    }

    public String getNewProductSn() {
        return newProductSn;
    }

    public void setNewProductSn(String newProductSn) {
        this.newProductSn = newProductSn;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public String getNewProductName() {
        return newProductName;
    }

    public void setNewProductName(String newProductName) {
        this.newProductName = newProductName;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public BigDecimal getSubsidyPrice() {
        return subsidyPrice;
    }

    public void setSubsidyPrice(BigDecimal subsidyPrice) {
        this.subsidyPrice = subsidyPrice;
    }

    public BigDecimal getSalePrice() {
        return salePrice;
    }

    public void setSalePrice(BigDecimal salePrice) {
        this.salePrice = salePrice;
    }

    public BigDecimal getMarketPrice() {
        return marketPrice;
    }

    public void setMarketPrice(BigDecimal marketPrice) {
        this.marketPrice = marketPrice;
    }

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public Boolean getIsList() {
        return isList;
    }

    public void setIsList(Boolean isList) {
        this.isList = isList;
    }

    public Boolean getIsMarketable() {
        return isMarketable;
    }

    public void setIsMarketable(Boolean isMarketable) {
        this.isMarketable = isMarketable;
    }

    public Long getFirstCategoryId() {
        return firstCategoryId;
    }

    public void setFirstCategoryId(Long firstCategoryId) {
        this.firstCategoryId = firstCategoryId;
    }

    public String getFirstCategoryName() {
        return firstCategoryName;
    }

    public void setFirstCategoryName(String firstCategoryName) {
        this.firstCategoryName = firstCategoryName;
    }

    public Long getSecondCategoryId() {
        return secondCategoryId;
    }

    public void setSecondCategoryId(Long secondCategoryId) {
        this.secondCategoryId = secondCategoryId;
    }

    public String getSecondCategoryName() {
        return secondCategoryName;
    }

    public void setSecondCategoryName(String secondCategoryName) {
        this.secondCategoryName = secondCategoryName;
    }

    public Long getThirdCategoryId() {
        return thirdCategoryId;
    }

    public void setThirdCategoryId(Long thirdCategoryId) {
        this.thirdCategoryId = thirdCategoryId;
    }

    public String getThirdCategoryName() {
        return thirdCategoryName;
    }

    public void setThirdCategoryName(String thirdCategoryName) {
        this.thirdCategoryName = thirdCategoryName;
    }

    public Long getForthCategoryId() {
        return forthCategoryId;
    }

    public void setForthCategoryId(Long forthCategoryId) {
        this.forthCategoryId = forthCategoryId;
    }

    public String getForthCategoryName() {
        return forthCategoryName;
    }

    public void setForthCategoryName(String forthCategoryName) {
        this.forthCategoryName = forthCategoryName;
    }

    public String getMarkStatus() {
        return markStatus;
    }

    public void setMarkStatus(String markStatus) {
        this.markStatus = markStatus;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }

        if (obj instanceof ProductImportDTO) {
            ProductImportDTO dto = (ProductImportDTO) obj;
            if (dto.getBrandName().equals(this.brandName) && dto.getProductSn().equals(this.productSn) && dto.getProductName().equals(this.productName)) {
                return true;
            }
        }

        return false;
    }

    @Override
    public int hashCode() {
        return brandName.hashCode() * productSn.hashCode() * productName.hashCode();
    }
}
